#ifndef H_PUP_ITEM_H
#define H_PUP_ITEM_H

#include <stdint.h>
#include <stdlib.h>

typedef union pup_item {
  char c;
  double d;
  float f;
  int i;
  int8_t i8;
  int16_t i16;
  int32_t i32;
  int64_t i64;
  long l;
  long long ll;
  short s;
  size_t szt;
  unsigned u;
  unsigned char uc;
  unsigned long ul;
  unsigned long long ull;
  unsigned short us;
  uint8_t u8;
  uint16_t u16;
  uint32_t u32;
  uint64_t u64;
  void* ptr;
} pup_item_t;

static inline pup_item_t pup_item_char(char c);
static inline pup_item_t pup_item_double(double d);
static inline pup_item_t pup_item_float(float f);
static inline pup_item_t pup_item_int(int i);
static inline pup_item_t pup_item_int8(int8_t i8);
static inline pup_item_t pup_item_int16(int16_t i16);
static inline pup_item_t pup_item_int32(int32_t i32);
static inline pup_item_t pup_item_int64(int64_t i64);
static inline pup_item_t pup_item_long(long l);
static inline pup_item_t pup_item_longlong(long long ll);
static inline pup_item_t pup_item_short(short s);
static inline pup_item_t pup_item_sizet(size_t szt);
static inline pup_item_t pup_item_uint(unsigned u);
static inline pup_item_t pup_item_uchar(unsigned char uc);
static inline pup_item_t pup_item_ulong(unsigned long ul);
static inline pup_item_t pup_item_ulonglong(unsigned long long ull);
static inline pup_item_t pup_item_ushort(unsigned short us);
static inline pup_item_t pup_item_uint8(uint8_t u8);
static inline pup_item_t pup_item_uint16(uint16_t u16);
static inline pup_item_t pup_item_uint32(uint32_t u32);
static inline pup_item_t pup_item_uint64(uint64_t u64);
static inline pup_item_t pup_item_ptr(void* ptr);

#include "inlines/item.inl"

#endif /* H_PUP_ITEM_H */

